package com.yidu.best.stock.moneyTransfers.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yidu.best.stock.moneyTransfers.dao.MoneyTransfersDao;
import com.yidu.best.stock.moneyTransfers.domain.MoneyTransfers;
import com.yidu.best.stock.moneyTransfers.domain.MoneyTransfersVo;
import com.yidu.best.stock.moneyTransfers.service.MoneyTransferService;
@Service
public class MoneyTransfersServiceImpl implements MoneyTransferService{
	@Autowired
	private MoneyTransfersDao moneyTransfersDao;
	@Override
	public Map<String, Object> findPageQuery(MoneyTransfersVo moneyTransfersVo) {
		 int page = (moneyTransfersVo.getPage()-1)*moneyTransfersVo.getLimit(); moneyTransfersVo.setPage(page);
			 List<MoneyTransfers> pageByParam = moneyTransfersDao.findPageQuery(moneyTransfersVo);
			int count = moneyTransfersDao.countMoneyTransfers(moneyTransfersVo);
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("data",pageByParam);
			map.put("count", count);
			map.put("msg", "");
			map.put("code", 0);
			return map;
	}

}
